<template>
	<view>
		<!-- <view class="title">
			<text class="box">日期</text>
			<text class="box">提现方式</text>
			<text class="box">金额(元)</text>
			<text class="box">状态</text>
		</view>
		<view class="test" v-for="(item,index) in list" :key="index">
			<text class="pox">{{item.draw_ctime}}</text>
			<text class="pox">微信</text>
			<text class="pox">{{item.draw_amount}}</text>
			<text class="pox" v-if='item.draw_status === 0'>待审核</text>
			<text class="pox" v-if='item.draw_status === 1'>待打款</text>
			<text class="pox" v-if='item.draw_status === 2'>已打款</text>
		</view> -->
		<uni-table>
			<uni-tr>
				<uni-th>日期</uni-th>
                    <uni-th>提现方式</uni-th>
                    <uni-th>提现金额</uni-th>
                    <uni-th>状态</uni-th>
			</uni-tr>
			<uni-tr v-for="(item,index) in list" :key="index">
                    <uni-td>{{item.draw_ctime}}</uni-td>
                    <uni-td>{{ item.draw_status===1?'银行卡':'余额' }}</uni-td>
                    <uni-td>{{item.draw_amount}}元</uni-td>
                    <uni-td v-if='item.draw_status === 0'>待审核</uni-td>
                    <uni-td v-if='item.draw_status === 1'>待打款</uni-td>
                    <uni-td v-if='item.draw_status === 2'>已打款</uni-td>
                </uni-tr>
		</uni-table>
	</view>
</template>

<script>
	import {get,post,showToast} from '../../js/common';
	export default {
		data() {
			return {
				userId:'',
				list:[]
			};
		},
		onLoad() {
			this.getDrawInfoByUserId()
		},
		methods:{
			getDrawInfoByUserId() {
				try {
					this.userId = uni.getStorageSync('userId')
					const params = {
						userId: this.userId
					}
					post('mobileapi/pcdis/getDrawInfoByUserId', params).then(res => {
						this.list = res.data.list
					})
				} catch (e) {}
			},
		}
	}
</script>

<style>
.title{
	height: 100upx;
	background: #eeeeee;
	display: flex;
	font-size: 28upx;
	text-align: center;
	line-height: 120upx;
}
.box{
	flex: 1;
}
.test{
	margin: 20upx 0 0 0;
	display: flex;
	font-size: 28upx;
	text-align: center;
	overflow: hidden; 
	white-space: nowrap; 
}
.pox{
	flex: 1;
	line-height: 60upx;
}
.txt{
	flex: 1;
}
</style>
